/**
 * 七牛云配置
 */
const qiniu = require('qiniu');

// 创建上传凭证
const accessKey = 'I62QHSQiJgK0KDNoJJouf0IVt3t2dBYBT2zUMp5I';
const secretKey = '97H75Ev9wtC6Bj8jU5pjapHqR6cD00UI1BlNrjlL';
const mac = new qiniu.auth.digest.Mac(accessKey, secretKey);
const options = {
    // 七牛云空间名称
    scope: 'kaiyou',
    // 过期时间
    expires: 7200
};
const putPolicy = new qiniu.rs.PutPolicy(options);
const uploadToken = putPolicy.uploadToken(mac);

module.exports = {
    uploadToken
};